GXGetPaths
You can use theGXGetPaths
function to determine the geometry of a path shape.
long GXGetPaths(gxShape source, gxPaths *data);
source
- A reference to the path shape whose geometry you want to determine.
data
- A pointer to a
gxPaths
structure. The function copies the source shape's geometry into this structure.- function result
- The length in bytes of the source shape's geometry.
DESCRIPTION
TheGXGetPaths
function copies the geometry information from the source path shape into thegxPaths
structure pointed to by thedata
parameter. As the function result, this function returns the length in bytes of the path geometry.If the source shape is not a path shape, this function posts the error code
illegal_type_for_shape
.You may pass
nil
for thedata
parameter. In this case, theGXGetPaths
function still returns the length of the data, but it does not return the actual data in thedata
parameter.Typically, to use this function, you go through the following steps:
- Determine the length of the path data by calling this function, passing
nil
for thedata
parameter.- Allocate enough memory to hold the path data.
- Call this function again, passing a pointer to the allocated memory in the
data
parameter.
ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory shape_is_nil illegal_type_for_shape (debugging version) SEE ALSO
For general information about path geometries, see "Path Shapes" on page 2-25.For the definition of the
gxPaths
structure, see page 2-107.To create a new path shape, use the
GXNewPaths
function, which is described on page 2-117.To change the geometry of an existing path shape, use the
GXSetPaths
function, which is described in the next section.To draw a path geometry without creating a path shape, use the
GXDrawPaths
function, which is described on page 2-162. To draw a path shape, use theGXDrawShape
function, which is described in the chapter "Shape Objects" in Inside Macintosh: QuickDraw GX Objects.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help